package com.qf.boot2203.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

//@Component
@Data
// 从 配置文件application.properties中，获取mycar开头的key的value，注入到当前对象同名的属性中
@ConfigurationProperties(prefix = "mycar")
public class Car {

    private String brand;

    private Integer price;


}
